package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.model.album.TrackInfo;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/***
 * 声音内部调用feign接口
 */
@FeignClient(name = "service-album", path = "/client/track/trackInfo", contextId = "trackInfoFeignClient")
public interface TrackInfoFeignClient {

    /**
     * 查询声音的详细信息,和可以购买的声音的列表
     * @param trackId
     * @return
     */
    @GetMapping(value = "/trackInfo/{trackId}/{trackCount}")
    List<TrackInfo> trackInfo(@PathVariable(value = "trackId") Long trackId,
                              @PathVariable(value = "trackCount") Integer trackCount);

  /**
   * 查询声音的详细信息
   * @param trackId
   * @return
   */
  @GetMapping(value = "/getTrackInfo/{trackId}")
  TrackInfo getTrackInfo(@PathVariable(value = "trackId") Long trackId);
}
